<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>查看数据</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../assets/libs/layui/css/layui.css" media="all">
</head>

<body>

    <form class="layui-form" lay-filter="example">

        <div class="layui-form-item" style="margin-top: 20px">
            <label class="layui-form-label">运动编号:</label>
            <div class="layui-input-block" style="margin-right: 20px">
                <input type="text" name="motionId" disabled="true" autocomplete="off" id="motionId" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item" style="margin-top: 20px">
            <label class="layui-form-label">运动名称:</label>
            <div class="layui-input-block" style="margin-right: 20px">
                <input type="text" name="motionType" lay-verify="title" autocomplete="off" disabled="true"
                    id="motionType" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">运动图片:</label>
            <div class="layui-input-block" style="margin-right: 20px">
                <img alt="" srcset="" disabled="true" name="motionImg" id="motionImg" width="100" height="100" />
            </div>
        </div>

    </form>


    <script src="../../assets/libs/layui/layui.js" charset="utf-8"></script>
    <script src="../js/util.js" charset="utf-8"></script>
    <script>

        layui.config({
            base: '/module/'
        }).use(['jquery', 'layer', 'table', 'form', 'config'], function () {
            var $ = layui.jquery;
            var layer = layui.layer;
            var form = layui.form;
            var config = layui.config;
            var req = GetRequest();
            var no = req['editNo'];//获取请求的url参数editNo的值
            //获取当前编辑的数据
            $.ajax({
                url: config.base_server + 'GetMotionById?editNo=' + no,
                dataType: 'json',
                type: 'get',
                success: function (data) {
                    data = data.data;
                    $('#motionId').val(data[0].motionId);
                    $('#motionType').val(data[0].motionType);
                    $('#motionImg').attr('src', data[0].motionImg);
                }
            })
        });
    </script>


</body>